package com.hashmap1;

public class Account {
private int accountNumber;
private String holderName;
public int getAccountNumber() {
	return accountNumber;
}
public void setAccountNumber(int accountNumber) {
	this.accountNumber = accountNumber;
}
public String getHolderName() {
	return holderName;
}
public void setHolderName(String holderName) {
	this.holderName = holderName;
}
public String toString(){
	return accountNumber+"\t"+holderName;
}
public int hashCode(){
	String accno=Integer.toString(accountNumber);
	int hash=accno.hashCode()+holderName.hashCode();
	return hash;
}
public boolean equals(Object obj){
	Account ac=(Account)obj;
	return this.accountNumber==ac.accountNumber && this.holderName==ac.holderName;
}
}
